home *** CD-ROM | disk | FTP | other *** search
/ Workbench Add-On / Workbench Add-On - Volume 1.iso / BBS-Archive / Dev / GNU-SMALLTALK.lha / examples / Makefile < prev    next >
Makefile  |  1992-02-15  |  5KB  |  174 lines

  1. ######################################################################
  2. #
  3. # Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc.
  4. # Written by Steve Byrne, with lots of good input from Dave Ciemiewicz.
  5. #
  6. # This file is part of GNU Smalltalk.
  7. #
  8. # GNU Smalltalk is free software; you can redistribute it and/or modify it
  9. # under the terms of the GNU General Public License as published by the Free
  10. # Software Foundation; either version 1, or (at your option) any later version.
  11. # GNU Smalltalk is distributed in the hope that it will be useful, but WITHOUT
  12. # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. # FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
  14. # details.
  15. # You should have received a copy of the GNU General Public License along with
  16. # GNU Smalltalk; see the file COPYING.  If not, write to the Free Software
  17. # Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  
  18. #
  19. #######################################################################
  20.  
  21. ##################
  22. ##################
  23. ##################
  24. ###
  25. ### See mst.texinfo for details on installation.
  26. ###
  27. ##################
  28. ##################
  29. ##################
  30.  
  31. ##############
  32. #
  33. # These variables you may wish to change
  34. #
  35. ##############
  36.  
  37. # Mail path to GNU Smalltalk maintainer (Steve Byrne)
  38. MAINTAINER = 'nfsun!sbyrne@uunet.uu.net'
  39.  
  40. # Uncomment this to use the winning GNU C compiler
  41. #CC = gcc
  42.  
  43. # These two definitions are used to allow you to add your own files
  44. # and libraries that will be linked into the GNU Smalltalk executable image.
  45. # see ./examples/Makefile for an example of how to use these
  46. USER_OBJS = win.o
  47. USER_LIBS = -lsuntool -lsunwindow -lpixrect
  48.  
  49. # This controls what file gets created on a 'make tar'...it could be the name
  50. # of a tape drive.
  51. TAR_FILE = mst.tar    # change this or override to be correct for your site
  52.  
  53. # Note: an alternative is  CPP = /lib/cpp
  54. CPP = cc -E
  55.  
  56. # Uncomment this line to enable the ultra-winning readline-reader
  57. #READLINE = -DUSE_READLINE
  58.  
  59. ######################################################################
  60. ######################################################################
  61. ######################################################################
  62. ###
  63. ### You typically won't want to change any variables below this 
  64. ### point, although you may want to add rules for your own C functions
  65. ### below.
  66. ###
  67. ######################################################################
  68. ######################################################################
  69. ######################################################################
  70.  
  71. MAKE = make  # BSD doesn't have it as a default.
  72.  
  73. # This controls the distribution version (not completely yet)
  74. VERSION=1.1
  75.  
  76. all: xmakefile $(USER_OBJS)
  77.     @$(MAKE) $(MFLAGS) \
  78.         CC=$(CC) \
  79.         "USER_OBJS=$(USER_OBJS)" "USER_LIBS=$(USER_LIBS)" \
  80.         -f xmakefile mst
  81.  
  82. mst lexdebug: xmakefile $(USER_OBJS)
  83.     @$(MAKE) $(MFLAGS) CC=$(CC) \
  84.         "USER_OBJS=$(USER_OBJS)" "USER_LIBS=$(USER_LIBS)" \
  85.         -f xmakefile $@
  86.  
  87.  
  88.  
  89. unfin:
  90.     egrep -n '### ' *.[chy]
  91.  
  92. optionals:
  93.     egrep -n '??? ' *.[chy]
  94.  
  95. profile:
  96.     $(MAKE) CFLAGS='$(CFLAGS) -pg -Dprofiling' -f xmakefile $@
  97.  
  98. regress:
  99.     (cd ./test; run-regression-tests)
  100.  
  101. clean:
  102.     -rm -f *.o
  103.     -rm -f mst mst.im
  104.     -rm -f junk.c xmakefile
  105.  
  106. #
  107. # Install into the directories pointed to by mstpaths.h
  108. #
  109.  
  110. install: xmakefile
  111.     @$(MAKE) $(MFLAGS) -f xmakefile install
  112.  
  113. #
  114. # Create a tar file based on the Smalltalk source files
  115. #
  116. tar:
  117.     rm -f smalltalk-$(VERSION)
  118.     ln -s . smalltalk-$(VERSION)
  119.     sed -e "s/^/smalltalk-$(VERSION)\//" < mstfiles > mstdistfiles
  120.     tar cvf $(TAR_FILE) `cat mstdistfiles`
  121.     rm -f mstdistfiles
  122.  
  123. xmakefile: ymakefile mstconfig.h mstpaths.h
  124.     @echo "===== creating configuration dependent xmakefile"
  125.     rm -f xmakefile
  126.     cp ymakefile junk.c
  127.     $(CPP) -DFOR_MAKE $(READLINE) junk.c |                \
  128.     sed -e 's/^#.*//' -e 's/^[ \f\t][ \f\t]*$$//' -e 's/^ / /' |    \
  129.     sed -n -e '/^..*$$/p' > xmakefile
  130.     rm -f junk.c
  131.     @echo "===== done creating xmakefile"
  132.  
  133.  
  134.  
  135. #
  136. # Make the shar file for GNU Smalltalk
  137. #
  138. shar:
  139.     shar -imstfiles > mst.shar
  140.  
  141.  
  142. #
  143. # (Re)build the tags for Emacs
  144. #
  145. tags:
  146.     etags mst*.[ch]
  147.  
  148. senddiffs: diffs
  149.     kermit -e 1000 -s mst.diffs
  150.  
  151. mail-diffs:
  152.     @echo "Please enter a brief note describing the contents of"
  153.     @echo "the diffs file that you've created.  End with Ctrl-D."
  154.     @cat > mst.diffs.note
  155.     @echo "-----------------------------------" >> mst.diffs.note
  156.     @### If there's a more portable/better way to do this, please
  157.     @### don't hesitate to fix this and send the new version back -- SBB
  158.     @cat mst.diffs.note mst.diffs | mail $(MAINTAINER)
  159.  
  160. diffs:
  161.     mk_mst_diffs
  162.  
  163. setup:
  164.     @if [ -f ./orig ] ; then \
  165.         echo "./orig exists, but is not a directory" ; \
  166.         exit 1 ; \
  167.     fi
  168.     rm -rf ./orig
  169.     mkdir ./orig
  170.     tar cbf 20 - `cat mstfiles` | (cd ./orig; tar xbBf 20 -)
  171.  
  172.